<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			//13,18开头的11个数字,或者62开头的7或者8位同学
			//var reg=/^((1[38]\d{9})|(62\d{5,6}))$/;
			var reg=/^\W{2,4}$/;
			//var reg=/^do+g$/i;
			var tele=window.prompt("请输入你的名字：");
			alert(reg.test(tele));
			
			var regAge=/^((1[0-1])|[1-9])?\d$/;
			var inputage=window.prompt("age:");
			alert(regAge.test(inputage));
		</script>
	</head>
	<body>
	</body>
</html>
